mac80211: fix deadlock in driver-managed RX BA session start
authorJohannes Berg <johannes.berg@intel.com>
Wed, 6 Sep 2017 13:01:42 +0000 (15:01 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Sun, 15 Oct 2017 06:57:36 +0000 (07:57 +0100)
commitb22931e738d0d5c9b0a2ea106348fe60c4e6cc35
tree8d116bbd084954709e8dc9f7bc2196756b57fe34
parent0a120ac6b678c92ebd92b9418b40ac80c0c878ef
mac80211: fix deadlock in driver-managed RX BA session start

When an RX BA session is started by the driver, and it has to tell
mac80211 about it, the corresponding bit in tid_rx_manage_offl gets
set and the BA session work is scheduled. Upon testing this bit, it
will call __ieee80211_start_rx_ba_session(), thus deadlocking as it
already holds the ampdu_mlme.mtx, which that acquires again.

Fix this by adding ___ieee80211_start_rx_ba_session(), a version of
the function that requires the mutex already held.

Cc: stable@vger.kernel.org
Fixes: 699cb58c8a52 ("mac80211: manage RX BA session offload without SKB queue")
Reported-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name mac80211-fix-deadlock-in-driver-managed-RX-BA-sessio.patch
net/mac80211/agg-rx.c
net/mac80211/ht.c
net/mac80211/ieee80211_i.h